#include <iostream>
using namespace std;

#include <vector>

// 算法头文件
#include <algorithm>

int main()                          //搜索
{
    // vector容器
    vector<int> myVec = {11, 23, 54, 67, 31, 9, 23};

    //迭代器
    auto iter = find(myVec.begin(), myVec.end(), 23);

    if (iter != myVec.end())
    {
        cout << "找到了元素23" << endl;
        cout << "迭代器指向的元素为：" << *iter << endl;
        cout << "迭代器指向的元素地址为：" << &(*iter) << endl;
    }
    else
    {
        cout << "没找到元素23" << endl;
    }
}